home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / DriverFamilyMatching.a < prev    next >
Encoding:
Text File  |  1997-08-12  |  5.5 KB  |  145 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        DriverFamilyMatching.a
  3. ;
  4. ;    Contains:    xxx put contents here xxx
  5. ;
  6. ;    Version:    Technology:    
  7. ;                Release:    Universal Interfaces 3.0.1
  8. ;
  9. ;    Copyright:    © 1995-1997 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__DRIVERFAMILYMATCHING__') = 'UNDEFINED' THEN
  19. __DRIVERFAMILYMATCHING__ SET 1
  20.  
  21.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  22.     include 'Types.a'
  23.     ENDIF
  24.     IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
  25.     include 'NameRegistry.a'
  26.     ENDIF
  27.     IF &TYPE('__CODEFRAGMENTS__') = 'UNDEFINED' THEN
  28.     include 'CodeFragments.a'
  29.     ENDIF
  30.  
  31.  
  32. ;  ##############################################
  33. ;   Well known properties in the Name Registry
  34. ;  ##############################################
  35.  
  36.  
  37. ;  CPassThru 
  38.  
  39. ;  #########################################################
  40. ;   Descriptor for Drivers and NDRVs
  41. ;  #########################################################
  42.  
  43.  
  44. ;  Driver Typing Information Used to Match Drivers With Devices 
  45. DriverType                RECORD 0
  46. nameInfoStr                 ds        Str31            ; offset: $0 (0)        ;  Driver Name/Info String
  47. version                     ds        NumVersion        ; offset: $20 (32)        ;  Driver Version Number
  48. sizeof                     EQU *                    ; size:   $24 (36)
  49.                         ENDR
  50. ; typedef struct DriverType *            DriverTypePtr
  51.  
  52. ;  OS Runtime Information Used to Setup and Maintain a Driver's Runtime Environment 
  53. ; typedef OptionBits                     RuntimeOptions
  54.  
  55.  
  56. kDriverIsLoadedUponDiscovery    EQU        $00000001            ; auto-load driver when discovered
  57. kDriverIsOpenedUponLoad            EQU        $00000002            ; auto-open driver when loaded
  58. kDriverIsUnderExpertControl        EQU        $00000004            ; I/O expert handles loads/opens
  59. kDriverIsConcurrent                EQU        $00000008            ; supports concurrent requests
  60. kDriverQueuesIOPB                EQU        $00000010            ; device manager doesn't queue IOPB
  61. kDriverIsLoadedAtBoot            EQU        $00000020            ; Driver is loaded at the boot time 
  62. kDriverIsForVirtualDevice        EQU        $00000040            ; Driver is for a virtual Device 
  63. kDriverSupportDMSuspendAndResume EQU    $00000080            ; Driver supports Device Manager Suspend and Resume command 
  64. DriverOSRuntime            RECORD 0
  65. driverRuntime             ds.l    1                ; offset: $0 (0)        ;  Options for OS Runtime
  66. driverName                 ds        Str31            ; offset: $4 (4)        ;  Driver's name to the OS
  67. driverDescReserved         ds.l    8                ; offset: $24 (36)        ;  Reserved area
  68. sizeof                     EQU *                    ; size:   $44 (68)
  69.                         ENDR
  70. ; typedef struct DriverOSRuntime *        DriverOSRuntimePtr
  71.  
  72. ;  OS Service Information Used To Declare What APIs a Driver Supports 
  73. ; typedef UInt32                         ServiceCount
  74.  
  75. DriverServiceInfo        RECORD 0
  76. serviceCategory             ds.l    1                ; offset: $0 (0)        ;  Service Category Name
  77. serviceType                 ds.l    1                ; offset: $4 (4)        ;  Type within Category
  78. serviceVersion             ds        NumVersion        ; offset: $8 (8)        ;  Version of service
  79. sizeof                     EQU *                    ; size:   $C (12)
  80.                         ENDR
  81. ; typedef struct DriverServiceInfo *    DriverServiceInfoPtr
  82.  
  83. DriverOSService            RECORD 0
  84. nServices                 ds.l    1                ; offset: $0 (0)        ;  Number of Services Supported
  85. service                     ds        DriverServiceInfo ; offset: $4 (4) <-- really an array of length one ;  The List of Services (at least one)
  86. sizeof                     EQU *                    ; size:   $10 (16)
  87.                         ENDR
  88. ; typedef struct DriverOSService *        DriverOSServicePtr
  89.  
  90. ;  Categories 
  91.  
  92. kServiceCategoryDisplay            EQU        'disp'                ; Display Manager
  93. kServiceCategoryOpenTransport    EQU        'otan'                ; Open Transport
  94. kServiceCategoryBlockStorage    EQU        'blok'                ; Block Storage
  95. kServiceCategoryNdrvDriver        EQU        'ndrv'                ; Generic Native Driver
  96. kServiceCategoryScsiSIM            EQU        'scsi'                ; SCSI 
  97. kServiceCategoryFileManager        EQU        'file'                ; File Manager 
  98. kServiceCategoryIDE                EQU        'ide-'                ; ide 
  99. kServiceCategoryADB                EQU        'adb-'                ; adb 
  100. kServiceCategoryPCI                EQU        'pci-'                ; pci bus 
  101.                                                             ; Nu Bus 
  102. kServiceCategoryDFM                EQU        'dfm-'                ; DFM 
  103. kServiceCategoryMotherBoard        EQU        'mrbd'                ; mother Board 
  104. kServiceCategoryKeyboard        EQU        'kybd'                ; Keyboard 
  105. kServiceCategoryPointing        EQU        'poit'                ; Pointing 
  106. kServiceCategoryRTC                EQU        'rtc-'                ; RTC 
  107. kServiceCategoryNVRAM            EQU        'nram'                ; NVRAM 
  108. kServiceCategorySound            EQU        'sond'                ; Sound (1/3/96 MCS) 
  109. kServiceCategoryPowerMgt        EQU        'pgmt'                ; Power Management 
  110. kServiceCategoryGeneric            EQU        'genr'                ; Generic Service Category to receive general Events 
  111. ;  Ndrv ServiceCategory Types 
  112.  
  113. kNdrvTypeIsGeneric                EQU        'genr'                ; generic
  114. kNdrvTypeIsVideo                EQU        'vido'                ; video
  115. kNdrvTypeIsBlockStorage            EQU        'blok'                ; block storage
  116. kNdrvTypeIsNetworking            EQU        'netw'                ; networking
  117. kNdrvTypeIsSerial                EQU        'serl'                ; serial
  118. kNdrvTypeIsParallel                EQU        'parl'                ; parallel 
  119. kNdrvTypeIsSound                EQU        'sond'                ; sound
  120. kNdrvTypeIsBusBridge            EQU        'brdg'
  121. ; typedef UInt32                         DriverDescVersion
  122.  
  123. ;     The Driver Description 
  124.  
  125. kInitialDriverDescriptor        EQU        0
  126. kVersionOneDriverDescriptor        EQU        1
  127.  
  128. kTheDescriptionSignature        EQU        'mtej'
  129. kDriverDescriptionSignature        EQU        'pdes'
  130.  
  131. DriverDescription        RECORD 0
  132. driverDescSignature         ds.l    1                ; offset: $0 (0)        ;  Signature field of this structure
  133. driverDescVersion         ds.l    1                ; offset: $4 (4)        ;  Version of this data structure
  134. driverType                 ds        DriverType        ; offset: $8 (8)        ;  Type of Driver
  135. driverOSRuntimeInfo         ds        DriverOSRuntime ; offset: $2C (44)        ;  OS Runtime Requirements of Driver
  136. driverServices             ds        DriverOSService ; offset: $70 (112)        ;  Apple Service API Membership
  137. sizeof                     EQU *                    ; size:   $80 (128)
  138.                         ENDR
  139. ; typedef struct DriverDescription *    DriverDescriptionPtr
  140.  
  141.  
  142.  
  143.     ENDIF ; __DRIVERFAMILYMATCHING__ 
  144.  
  145.